package com.ht.ui.actions.view;

import com.ht.aems.swing.util.MyAction;
import com.ht.ui.MainFrame;
import com.ht.ui.MainPanel;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;

/**
 * Created by IntelliJ IDEA.
 *
 * @author Dong Shufeng
 *         Date: 2010-1-30
 */
public class ShowIntroduce extends MyAction {
    public void actionPerformed(ActionEvent e) {
        Object obj = e.getSource();
        boolean b = ((JCheckBoxMenuItem) obj).isSelected();
        for (Component c : ((MainFrame) this.getAncestor()).getContentPane().getComponents()) {
            if (c instanceof MainPanel)
                ((MainPanel) c).setIntroducePanelVisible(b);
        }
    }
}
